import pytest,os,sys

root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root_path)
# from Tools.logger import logger
# from Tools.email import e_maile
if __name__ == '__main__':
    # logger()
    # """allure报告"""
    pytest.main([r'C:\Users\张震海\Desktop\a3mall\cases\case1.py','-s','--clean-alluredir','--alluredir=./report'])
    os.system('allure generate ./report o ./html --clean')
    # """html报告"""
    # pytest.main([
    #     r'D:\gaosi_xm\AutoWeb\cases\case.py',
    #     '--html=report.html',
    #     '--self-contained-html'
    # ])
    # """xml 报告"""
    # pytest.main([
    #     r'D:\gaosi_xm\AutoWeb\cases\case.py',
    #     '-s',
    #     '--junit-xml=./report/results.xml'  # 添加这行来生成 JUnit XML 报告
    # ])
    # os.system('junit2html ./report/results.xml ./report/results.html')

    # pytest.main([r'D:\gaosi_xm\AutoWeb\cases\case.py','-s','--json=report.json'])

    # 发送log日志，html报告，allure报告
    # e_maile([r'C:\Users\张震海\Desktop\a3mall\a.log',r'C:\Users\张震海\Desktop\a3mall\report.html',r'C:\Users\张震海\Desktop\a3mall\allure-report\index.html'])
